<?php $this->section->begin('breadcrumb')?>
<div id="global-breadcrumb">
	<ul>
		<li><a href="<?php echo $this->url->action("index", "ControlPanel", "OnlineSupport")?>">Hỗ trợ trực tuyến</a></li>
		<li class="current">Sửa thông tin hỗ trợ <?php echo $this->model->name?></li>
	</ul>
</div>
<?php $this->section->end()?>
<?php $this->content->begin()?>
<div class="widget-shell inner-shadow">
	<div class="widget-header">
		<h2><?php echo $this->model->name?></h2>
	</div>
	<div class="widget-body">
		<?php
		    $ajaxOption['begin'] = "begin";
		    $ajaxOption['success'] = "success";
		    $this->form->beginAjax($ajaxOption, 'edit');
		?>
			<?php $this->form->hiddenFor("id")?>
			<div class="global-form">
				<div class="half margin-bottom-20">
				    <?php $this->form->labelFor("name", array('class' => 'normal-label'))?>
				    <?php $this->form->textboxFor("name", array('class' => 'normal'))?>
				    <?php $this->form->validationMessage("name")?>
				</div>
				
				<div class="half margin-bottom-20">
				    <?php $this->form->labelFor("yahoo_id", array('class' => 'normal-label'))?>
				    <?php $this->form->textboxFor("yahoo_id", array('class' => 'normal'))?>
				    <?php $this->form->validationMessage("yahoo_id")?>
				</div>
				<div class="fclear"></div>
				<div class="half margin-bottom-20">
					<?php $this->form->labelFor("skype_id", array('class' => 'normal-label'))?>
					<?php $this->form->textboxFor("skype_id", array('class' => 'normal'))?>
					<?php $this->form->validationMessage("skype_id")?>
				</div>
				<div class="fclear"></div>
				<div class="half margin-bottom-20">
				    <?php $this->form->labelFor("group_id", array('class' => 'normal-label'))?>
				    <?php $this->form->select('group_id', $arrGroup)?>
				    <?php $this->form->validationMessage("group_id")?>
				</div>
			</div>
			<div class="alert alert-info alert-loading" style="margin-bottom: 0; display: none;">
				<p><span class="ico-text ico-alert-loading"></span><span>Đang cập nhật thông tin vào hệ thống...</span></p>
			</div>
			<div class="alert alert-error" style="margin-bottom: 0; display: none;">
				<p><span class="ico-text ico-alert-error"></span><span id="errorMessage"></span></p>
			</div>
			<div class="alert alert-success" style="margin-bottom: 0; display: none;">
				<p><span class="ico-text ico-alert-success"></span><span id="successMessage"></span></p>
			</div>
			<div class="global-form-footer">
				<input class="btn-theme" id="submit" type="submit" value="Cập nhật">
				<a href="<?php echo $this->url->action("index")?>" class="button tool-tip" title="Danh mục quốc gia">
					<span class="ico-text ico-text-category"></span>Danh sách hỗ trợ
				</a>
				<a href="<?php echo $this->url->action("create")?>" class="button tool-tip" title="Thêm quốc gia mới">
					<span class="ico-btn ico-text-brainstorm"></span>Thêm hỗ trợ mới
				</a>
			</div>
		<?php $this->form->end()?>
	</div>
</div>
<?php $this->content->end()?>
<?php $this->section->begin("scripts")?>
<?php 
//Load js
$this->html->loadJs(array(
                        'Scripts/jquery.validate.min.js',
                        'Scripts/jquery.validate.unobtrusive.min.js',
                        'Scripts/jquery.unobtrusive-ajax.min.js',
                        'Areas/ControlPanel/Assets/js/controlpanel.js',
                    ));
?>
<?php $this->section->end()?>